package com.matt.service.cookbook;

import com.matt.domain.cookbook.Recipe;
import com.matt.domain.cookbook.RecipeConfig;

import java.util.List;
import java.util.Map;

public interface RecipeConfigService {

	public static final String RECIPE_TYPE_KEY = "recipe_type";

	List<RecipeConfig> selectRecipeTypeByAreaId(String areaId);

	List<RecipeConfig> selectFoodType();

	List<RecipeConfig> selectConfigList(String areaId, String type);

	RecipeConfig selectConfigNameIsExit(String areaId, String type, String recipeName);

	RecipeConfig insertRecipeType(String areaId, String recipeName);

	void updateConfigNameByAreaIdAndTypeAndValue(String name, String areaId, String type, String value);

	void updateConfig(RecipeConfig config);

	RecipeConfig selectConfigByAreaIdAndTypeAndValue(String areaId, String type, String value);

	RecipeConfig selectConfigByAreaIdAndTypeAndName(String areaId, String type, String name);

	RecipeConfig deleteConfigByAreaIdAndTypeAndValue(String areaId , Long recipeId);

	/**
	 * 更新餐次排序
	 * @param schoolId 学校ID
	 * @param recipeId 餐次value
	 * @param sort 当前字典排序
	 * @return
	 */
	void updateRecipeTypeSort(String areaId, String recipeId, int sort);

	void upRecipeTypeSort(String areaId,String recipeId);

	void downRecipeTypeSort(String areaId,String recipeId);

	RecipeConfig selectRecipeConfigByAreaIdAndNameAndType(String areaId,String name ,String type);
}